# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file '复选框-设置用户权限.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
import sys
from PySide2 import QtCore, QtWidgets, QtGui


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.checkBox = QCheckBox(self.centralwidget)
        self.checkBox.setObjectName(u"checkBox")
        self.checkBox.setGeometry(QRect(160, 150, 151, 41))
        self.checkBox_2 = QCheckBox(self.centralwidget)
        self.checkBox_2.setObjectName(u"checkBox_2")
        self.checkBox_2.setGeometry(QRect(310, 160, 101, 21))
        self.checkBox_3 = QCheckBox(self.centralwidget)
        self.checkBox_3.setObjectName(u"checkBox_3")
        self.checkBox_3.setGeometry(QRect(160, 210, 91, 21))
        self.checkBox_4 = QCheckBox(self.centralwidget)
        self.checkBox_4.setObjectName(u"checkBox_4")
        self.checkBox_4.setGeometry(QRect(310, 210, 91, 19))
        self.checkBox_5 = QCheckBox(self.centralwidget)
        self.checkBox_5.setObjectName(u"checkBox_5")
        self.checkBox_5.setGeometry(QRect(160, 260, 91, 19))
        self.pushButton = QPushButton(self.centralwidget)
        self.pushButton.setObjectName(u"pushButton")
        self.pushButton.setGeometry(QRect(330, 300, 93, 28))

        # 设置“修改按钮”的信号与槽
        self.pushButton.clicked.connect(self.getvalue)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName(u"menubar")
        self.menubar.setGeometry(QRect(0, 0, 800, 26))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName(u"statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)

        QMetaObject.connectSlotsByName(MainWindow)
    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Checkboxproject", None))
        self.checkBox.setText(QCoreApplication.translate("MainWindow", u"\u57fa\u672c\u4fe1\u606f\u7ba1\u7406", None))
        self.checkBox_2.setText(QCoreApplication.translate("MainWindow", u"\u8fdb\u8d27\u7ba1\u7406", None))
        self.checkBox_3.setText(QCoreApplication.translate("MainWindow", u"\u9500\u552e\u7ba1\u7406", None))
        self.checkBox_4.setText(QCoreApplication.translate("MainWindow", u"\u5e93\u5b58\u7ba1\u7406", None))
        self.checkBox_5.setText(QCoreApplication.translate("MainWindow", u"\u7cfb\u7edf\u7ba1\u7406", None))
        self.pushButton.setText(QCoreApplication.translate("MainWindow", u"\u8bbe\u7f6e", None))
    # retranslateUi
    # 设置 “设置”按钮的槽函数
    def getvalue(self):
        oper = ""
        if self.checkBox.isChecked():
            oper += self.checkBox.text()
        if self.checkBox_2.isChecked():
            oper += '\n' + self.checkBox_2.text()
        if self.checkBox_3.isChecked():
            oper += '\n' + self.checkBox_3.text()
        if self.checkBox_4.isChecked():
            oper += '\n' + self.checkBox_4.text()
        if self.checkBox_5.isChecked():
            oper += '\n' + self.checkBox_5.text()
        from PySide2.QtWidgets import QMessageBox
        QMessageBox.information(MainWindow, "提示", "您选择的权限如下：\n"+oper, QMessageBox.Ok)


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())
